<!-- 数据持久化示例页面 -->
<!-- 必须全局拥有唯一的id -->
<div id="persistencedemo">
    <div style="color:red">
        <h2>单表增删查改示例</h2>
    </div>
	<!-- 搜索栏 -->
    <el-form-q form="query" :field-data="queryFields" search-table="demoTable" :buttons="queryButtons"></el-form-q>
	
	<!-- 工具栏 -->
	<div class="yu-toolBar">
        <el-button-group>
            <el-button icon="add" @click="openCreateFn" >新增</el-button>
            <el-button  icon="edit" @click="openEditFn" >修改</el-button>
            <el-button  icon="delete"  @click="deleteFn" >删除</el-button>
            <el-button icon="edit" @click="openDetailFn" >查看</el-button>
        </el-button-group>
    </div>
	
	<!-- 表格 -->
    <el-table-x ref="demoTable"  :max-height="height"
                :data-url="urls.dataUrl" :base-params="dataParams" :table-columns="tableColumns" >
    </el-table-x>
    
 	<!--新增与编辑弹框 -->
    <el-dialog-x :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible"  height="370px" width="700px" @close="beforeClose">
        <el-form-x ref="WfTaskPoolForm" :group-fields="updateFields" :disabled="formDisabled" label-width="110px"></el-form-x>
        <div slot="footer" align="center">
            <el-button type="primary" @click="dialogFormVisible = false">关闭</el-button>
            <el-button v-if="dialogStatus=='creat'" type="primary" @click="saveCreateFn()">确 定</el-button>
            <el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">确 定</el-button>
        </div>
    </el-dialog-x>
    <br/>
    <br/>
    <div style="color:red">
       <h2> 数据权限示例：过滤出用户码为当前登录用户的记录</h2>
    </div>
    <br/>
    <!-- 表格 -->
    <el-table-x ref="authDemoTable"  :max-height="height"
                :data-url="urls.authDemoUrl" :base-params="dataParams" :table-columns="tableColumns" >
    </el-table-x>
</div>